package com.pig.service;

import java.util.List;
import java.util.Map;

import com.pig.aop.OperationLogger;
import com.pig.entity.AccountLogEntity;
import com.pig.entity.AccountUserEntity;
import com.pig.entity.AccountUserInfoEntity;
import com.pig.file.Image;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

public interface AccountUserService {
	/**
	 *用户登录
	 */
	public AccountUserEntity login(String accountName, String accountPassword, Integer accountState);

	/**
	 * 查询日志
	 * @param accountId
	 * @return
	 */
	public List<AccountLogEntity> queryLog(Integer accountId);


	/**
	 * 查询用户是否存在
	 * @return
	 */
	public AccountUserEntity  nameIs(AccountUserEntity accountUserEntity);

	/**
	 * 添加用户日志
	 * @param accountUserEntity
	 * @return
	 */
	public boolean insertLog(AccountLogEntity accountUserEntity);

	/**
	 * 转出 & 取錢
	 */
	public boolean out(String accountOutName,Double accountBalabce);

	/**
	 * 转入  &存錢
	 */
	public boolean in(String accountInName,Double accountBalabce);

	/**
	 * 查询用户是否存在
	 */
	public AccountUserEntity selectName(@Param("accountName") String accountName);


	/**
	 * 转账
	 * @param outName
	 * @param inName
	 * @param balance
	 * @return
	 */
	public boolean transferAccounts(String outName, String inName, Double balance);

	/**
	 * 转账
	 * @param accountName
	 * @param accountPassword
	 * @return
	 */
	public boolean updatePassword(String accountName,String accountPassword) ;


	/**
	 * 注册用户
	 */
	public boolean register(AccountUserEntity accountUserEntity);

	/**
	 * 注册用户信息表
	 */
	public int registerInfo(AccountUserInfoEntity accountUserInfoEntity);

	/**
	 * 修改图片
	 */
	public int updateImage(Image image);
}
	